package com.fastCms.business.mall.enums;

/**
 * 杭州人参大健康管理有限公司 版权所有 Copyright 2019<br>
 *
 * @Description: 商品属性字段类型<br>
 * @Project: healthPro <br>
 * @CreateDate: Created in 2019年4月9日 下午4:49:46 <br>
 * @Author: < a href="jiahui.zhao@healthpro.vip">jiahui.zhao</ a>
 */
public enum ProductAttributeType {

	TEXT(1, "文本输入"),
	RADIO(2, "单选"),
	CHECK_BOX(3, "多选"),
	DATE(4, "日期选择"),
	;

	private Integer code;
	private String name;

	public static ProductAttributeType getEnum(Integer code) {
        for (ProductAttributeType item : ProductAttributeType.values()) {
            if (item.code.equals(code)) {
                return item;
            }
        }
        return null;
    }

	public Integer getCode() {
		return code;
	}

	public void setCode(Integer code) {
		this.code = code;
	}

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	private ProductAttributeType(Integer code, String name) {
		this.code = code;
		this.name = name;
	}

}
